-
-
Notifications
You must be signed in to change notification settings - Fork 636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Always provide Python-for-Pants-scripts #18433
Conversation
), | ||
) | ||
|
||
result = await Get( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NB: I can't use ExternalTool
due to a circular reference: ExternalTool -> ExtractArchive -> Gunzip -> (This).
If someone wants to educate me on the easiest way to test the rule-in-docker code, please do. Otherwise I'll start searching other tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool stuff ⭐
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This PR decouples the Python Pants uses for its own nefarious purposes (like running PEX or `gunzip`) from the user search paths by either using `sys.executable` locally or downloading and using Python Build Standalone in a Docker environment. Additionally when making this change, the Python/pex code was refactored so that we always use this Python to run pex, with Python either being chosen by pex, or by using `PEX_PYTHON` env var at runtime. I think this is a nice cleanup of the handshake between `CompletePexEnvironment.create_argv` and `CompletePexEnvironment.environment_dict` used to have. On a side note, this (with `scie-pants` and pantsbuild#18352) this marks a complete divorce from any Python on the user system (or lack thereof) and running Python code.
This PR decouples the Python Pants uses for its own nefarious purposes (like running PEX or `gunzip`) from the user search paths by either using `sys.executable` locally or downloading and using Python Build Standalone in a Docker environment. Additionally when making this change, the Python/pex code was refactored so that we always use this Python to run pex, with Python either being chosen by pex, or by using `PEX_PYTHON` env var at runtime. I think this is a nice cleanup of the handshake between `CompletePexEnvironment.create_argv` and `CompletePexEnvironment.environment_dict` used to have. On a side note, this (with `scie-pants` and #18352) this marks a complete divorce from any Python on the user system (or lack thereof) and running Python code.
This should've been done in #18433 but wasn't. Same for the removal of the Gunzip cruft. It was supposed to be moved in that PR, but was only added. --------- Co-authored-by: Stu Hood <stuhood@gmail.com>
This should've been done in #18433 but wasn't. Same for the removal of the Gunzip cruft. It was supposed to be moved in that PR, but was only added. --------- Co-authored-by: Stu Hood <stuhood@gmail.com>
This should've been done in #18433 but wasn't. Same for the removal of the Gunzip cruft. It was supposed to be moved in that PR, but was only added. --------- Co-authored-by: Joshua Cannon <joshdcannon@gmail.com> Co-authored-by: Stu Hood <stuhood@gmail.com>
This PR decouples the Python Pants uses for its own nefarious purposes (like running PEX or
gunzip
) from the user search paths by either usingsys.executable
locally or downloading and using Python Build Standalone in a Docker environment.Additionally when making this change, the Python/pex code was refactored so that we always use this Python to run pex, with Python either being chosen by pex, or by using
PEX_PYTHON
env var at runtime. I think this is a nice cleanup of the handshake betweenCompletePexEnvironment.create_argv
andCompletePexEnvironment.environment_dict
used to have.On a side note, this (with
scie-pants
and #18352) this marks a complete divorce from any Python on the user system (or lack thereof) and running Python code.